﻿<Window x:Class="MContracts.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{Binding Path=DisplayName}" Height="768" Width="1024"       
        xmlns:controls="clr-namespace:MContracts.Controls"
        xmlns:converters="clr-namespace:MContracts.Classes.Converters" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:telerikRibbon="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
		xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
        WindowState="Maximized" xmlns:my="clr-namespace:MContracts.Controls.Dialogs">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/MContracts;component/Styles/WorkspacesTabControlStyle.xaml" />
                <ResourceDictionary>
                    <SolidColorBrush x:Key="RedBrush" Color="Red"/>
                    <SolidColorBrush x:Key="TransparentBrush" Color="Transparent"/>
                    <converters:BoolToBrushConverter TrueBrush="{StaticResource TransparentBrush}" FalseBrush="{StaticResource RedBrush}" x:Key="BoolToBrushConverter"/>
                    <converters:ContractToButtonImageConverter x:Key="ContractToButtonImageConverter"/>
                    <converters:ContractToButtonTextConverter x:Key="ContractToButtonTextConverter"/>
                    <converters:ContractdocConverter x:Key="ContractdocConverter" />
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>

        <Grid.Resources>

        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" x:Name="RibbonRow"/>
            <RowDefinition Height="*" x:Name="WorkspacesRow"/>
        </Grid.RowDefinitions>

        <telerikRibbon:RadRibbonView Grid.Row="0"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="MainRibbon" ApplicationName="АИС УД" >

            <telerik:RadRibbonView.Resources>
                <ControlTemplate x:Key="RibbonButtonControlTemplate" TargetType="{x:Type telerik:RadRibbonButton}">
                    <Grid>
                        <Border x:Name="buttonSurface" 
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="2">
                            <Border x:Name="buttonSurfaceInner" 
                            BorderBrush="Transparent"
                            BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>
                        <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}">
                            <ContentPresenter x:Name="ContentPresenter" 
                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                      Content="{TemplateBinding Content}"
                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                      RecognizesAccessKey="True" />
                            <!--  Set the HorizontalAlignment to this Grid  -->
                            <Grid HorizontalAlignment="Center">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" MaxHeight="28" />
                                </Grid.RowDefinitions>
                                <Image x:Name="Image" />
                                <TextBlock x:Name="textRow1" 
                                   Grid.Row="1"
                                   Margin="0,2,0,0"
                                   Text="{TemplateBinding TextRow1}"
                                   TextAlignment="Center" />
                                <TextBlock x:Name="textRow2" 
                                   Grid.Row="1"
                                   Margin="0,14,0,0"
                                   Text="{TemplateBinding TextRow2}"
                                   TextAlignment="Center" />
                            </Grid>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="buttonSurface" Property="BorderBrush" Value="#FFFFC92B" />
                            <Setter TargetName="buttonSurface" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Offset="1" Color="#FFFFFBA3" />
                                        <GradientStop Offset="0" Color="#FFFFFBDA" />
                                        <GradientStop Offset="0.43" Color="#FFFFD25A" />
                                        <GradientStop Offset="0.42" Color="#FFFEEBAE" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="buttonSurfaceInner" Property="BorderBrush" Value="White" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="buttonSurface" Property="BorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Color="#FF282828" />
                                        <GradientStop Offset="1" Color="#FF5F5F5F" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="buttonSurface" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Offset="0.996" Color="#FFFFD74E" />
                                        <GradientStop Offset="0.17" Color="#FFFFDCAB" />
                                        <GradientStop Offset="0.57" Color="#FFFE9227" />
                                        <GradientStop Offset="0.56" Color="#FFFFD18F" />
                                        <GradientStop Offset="0" Color="#FFFFBA74" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="buttonSurfaceInner" Property="BorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Color="#FFB69A78" />
                                        <GradientStop Offset="0.126" Color="#FFFFE17A" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ContentGrid" Property="Opacity" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsDefault" Value="True" />
                        <Trigger Property="CurrentSize" Value="Large" />
                        <Trigger Property="CurrentSize" Value="Medium">
                            <Setter TargetName="textRow1" Property="Grid.Row" Value="0" />
                            <Setter TargetName="textRow1" Property="Grid.Column" Value="1" />
                            <Setter TargetName="textRow1" Property="Margin" Value="4,0,1,0" />
                            <Setter TargetName="textRow1" Property="VerticalAlignment" Value="Center" />
                            <Setter TargetName="textRow1" Property="TextAlignment" Value="Left" />
                            <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="CurrentSize" Value="Small">
                            <Setter TargetName="textRow1" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>

            </telerik:RadRibbonView.Resources>
            <!--Backstage-->
            <telerikRibbon:RadRibbonView.ApplicationButtonContent>
                <TextBlock Text="Файл" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 4 0 0" />
            </telerikRibbon:RadRibbonView.ApplicationButtonContent>

            <telerikRibbon:RadRibbonView.Backstage>
                <telerikRibbon:RadRibbonBackstage>
                    <telerikRibbon:RadRibbonBackstageItem Header="Реестр договоров" IsSelectable="False"
							Command="{Binding ShowContractRepositoryCommand}" Icon="/MContracts;component/Images/Document_Text.png"/>
                    <telerikRibbon:RadRibbonBackstageItem Header="Реестр актов" IsSelectable="False"
							Command="{Binding ShowActRepositoryCommand}" Icon="/MContracts;component/Images/Document_Text.png"/>
                    <telerikRibbon:RadRibbonBackstageItem Header="Сохранить" IsSelectable="False"
							Command="{Binding SaveActiveWorkspaceCommand}" />
                    <telerikRibbon:RadRibbonBackstageItem Header="Выход" IsDefault="True" Command="{Binding CloseCommand}"/>
                </telerikRibbon:RadRibbonBackstage>
            </telerikRibbon:RadRibbonView.Backstage>



            <!--Quick Access Toolbar Items-->
            <telerikRibbon:RadRibbonView.QuickAccessToolBar>
                <telerikRibbon:QuickAccessToolBar>
                    <telerikRibbon:RadRibbonButton Text="Новый договор" Command="{Binding NewContractCommand}" Size="Small" SmallImage="/MContracts;component/Images/Add_16.png" telerik:KeyTipService.AccessText="1"/>
                    <telerikRibbon:RadRibbonButton Text="Реестр договоров"  Command="{Binding ShowContractRepositoryCommand}" SmallImage="/MContracts;component/Images/Document_Text.png" Size="Small" telerik:KeyTipService.AccessText="2" />
                    <telerikRibbon:RadRibbonButton Text="Печать" Command="{Binding ShowActRepositoryCommand}" SmallImage="/MContracts;component/Images/Document_Text.png" Size="Small" telerik:KeyTipService.AccessText="3" />
                </telerikRibbon:QuickAccessToolBar>
            </telerikRibbon:RadRibbonView.QuickAccessToolBar>




            <!--Contextual Groups-->
            <telerikRibbon:RadRibbonView.ContextualGroups>
                <telerikRibbon:RadRibbonContextualGroup x:Name="ContractdocTools" Color="#FF0CF0F8" Header="Договоры" />
            </telerikRibbon:RadRibbonView.ContextualGroups>

            <!--<Fluent:Ribbon.ContextualGroups>
                <Fluent:RibbonContextualTabGroup Header="Договоры" Visibility="Collapsed" x:Name="ContractsGroup" Background="Green" BorderBrush="Green" />
            </Fluent:Ribbon.ContextualGroups>-->

            <!--Contracts management-->
            <telerikRibbon:RadRibbonTab Header="Реестр договоров"  x:Name="ContractTabItem"  telerik:KeyTipService.AccessText="H">
                <telerikRibbon:RadRibbonGroup Header="Основные" telerikRibbon:ScreenTip.Title="Основные операции над договорами" telerik:KeyTipService.AccessText="FO">
                    <telerikRibbon:RadRibbonButton  Command="{Binding NewContractCommand}" Size="Large" Text="Новый договор" LargeImage="/MContracts;component/Resources/window_new.png" Template="{StaticResource RibbonButtonControlTemplate}" />
                    <telerikRibbon:RadRibbonButton Text="Новое ДС" Size="Large" LargeImage="/MContracts;component/Resources/view_right.png" Command="{Binding NewAgreementCommand}" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton Text="Новый СД" Size="Large" LargeImage="/MContracts;component/Resources/view_bottom.png" Command="{Binding NewSubgeneralCommand}" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton Text="Редактор связей" Size="Large" Command="{Binding ShowRelationsEditorCommand}" LargeImage="/MContracts;component/Resources/hyperlink_blue.png" Template="{StaticResource RibbonButtonControlTemplate}"/>
                </telerikRibbon:RadRibbonGroup>

                <telerikRibbon:RadRibbonGroup Header="">
                    <telerikRibbon:RadRibbonButton Command="{Binding OpenContractCommand}" Text="Открыть" Size="Large" LargeImage="/MContracts;component/Resources/open.png"  Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton Command="{Binding DeleteOrCancelContractCommand}" Text="{Binding SelectedContract, Converter={StaticResource ContractToButtonTextConverter}}" LargeImage="{Binding SelectedContract, Converter={StaticResource ContractToButtonImageConverter}}" x:Name="DeleteOrCancelButton"  Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                </telerikRibbon:RadRibbonGroup>

                <telerikRibbon:RadRibbonGroup Header="Фильтр договоров">
                    <controls:FilterContracts HorizontalAlignment="Stretch"  x:Name="filterContracts1" VerticalAlignment="Top"/>
                </telerikRibbon:RadRibbonGroup>

            </telerikRibbon:RadRibbonTab>

            <telerikRibbon:RadRibbonTab Header="Работа с договором" x:Name="SelectedContractTabItem" Visibility="Visible" >
                <telerikRibbon:RadRibbonGroup Header="Действия">
                    <Border CornerRadius="2" BorderBrush="{Binding Error, Converter={StaticResource BoolToBrushConverter}}" BorderThickness="2" ToolTip="{Binding Error}">
                        <telerikRibbon:RadRibbonButton ToolTip="Сохранить" LargeImage="/MContracts;component/Resources/stock_save.png" Command="{Binding SaveActiveWorkspaceCommand}" Text="Сохранить" Margin="1" Size="Large"  Template="{StaticResource RibbonButtonControlTemplate}" />
                    </Border>
                    <Border>
                        <telerikRibbon:RadRibbonButton ToolTip="Открыть редактор календарного плана договора" LargeImage="/MContracts;component/Images/config_date.png" Command="{Binding OpenContractScheduleCommand}" Text="Календарный план" Margin="1" Template="{StaticResource RibbonButtonControlTemplate}" Size="Large"/>
                    </Border>
                    <Border>
                        <telerikRibbon:RadRibbonButton ToolTip="Открыть реестр актов договора" LargeImage="/MContracts;component/Images/text_editor.png" Command="{Binding OpenContractActsCommand}" Text="Акты" Margin="1" Template="{StaticResource RibbonButtonControlTemplate}" Size="Large"/>
                    </Border>
                    <Border>
                        <telerikRibbon:RadRibbonDropDownButton Text="Акты приемки-передачи" >
                            <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                                <telerik:RadContextMenu BorderThickness="0">
                                    <telerik:RadMenuItem Header="Приёмки и передачи актов к договорам"  Command="{Binding CreateTransferContractsReport_8_2_Command}"/>
                                    <telerik:RadMenuItem Header="Приёмки и передачи договоров" Command="{Binding CreateTransferActsContractsReport_8_1_Command}"/>
                                </telerik:RadContextMenu>
                            </telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                        </telerikRibbon:RadRibbonDropDownButton>
                    </Border>
                </telerikRibbon:RadRibbonGroup>
            </telerikRibbon:RadRibbonTab>


            <telerikRibbon:RadRibbonTab Header="Документы" x:Name="DocsTabItem">
                <telerikRibbon:RadRibbonGroup Header="Распоряжения и приказ">
                    <telerikRibbon:RadRibbonButton  Text="Распоряжения" Command="{Binding ShowDisposalsRepositoryCommand}" LargeImage="/MContracts;component/Images/Document_Text.png" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton  Text="Приказы" Command="{Binding ShowOrdersRepositoryCommand}" LargeImage="/MContracts;component/Images/Document_Text.png" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                </telerikRibbon:RadRibbonGroup>
            </telerikRibbon:RadRibbonTab> 

            <!---Справочники-->
            <telerikRibbon:RadRibbonTab Header="Справочники" x:Name="CatalogTabItem">
                <telerikRibbon:RadRibbonGroup Header="Действия">
                    <telerikRibbon:RadRibbonButton ToolTip="Сохранить изменения" Command="{Binding SaveActiveWorkspaceCommand}" LargeImage="/MContracts;component/Resources/stock_save.png" Text="Сохранить" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                </telerikRibbon:RadRibbonGroup>
                <telerikRibbon:RadRibbonGroup Header="">

                    <telerikRibbon:RadRibbonDropDownButton Text="Контрагенты" LargeImage="/MContracts;component/Resources/stock_people.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem   Header="Контрагенты" Command="{Binding ContractorsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/bank.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>                                   
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Типы контрагентов" Command="{Binding ContractortypesShowCommand}"/>
                                
                                <telerik:RadMenuItem   Header="Должности"  Command="{Binding PositionsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/frontrow.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>

                                <telerik:RadMenuItem   Header="Должности контрагентов"  Command="{Binding ContractorpositionsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/frontrow_person.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Свойства" Command="{Binding PropertiesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Properties.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem   Header="Свойства контрагентов" Command="{Binding ContractorpropertiesShowCommand}"/>
                                <telerik:RadMenuItem   Header="Персоны"  Command="{Binding PersonsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/persons.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Ученые степени"   Command="{Binding DegreesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Degree.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Функциональные заказчики"  Command="{Binding FunctionalcustomersShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/User group.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Типы функциональных заказчиков"  Command="{Binding FunctionalcustomertypesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Types.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem   Header="Представители функциональных заказчиков" Command="{Binding FunccustomerpersonsShowCommand}"/>
                                <telerik:RadMenuItem   Header="Схемы визирования функционального заказчика" Command="{Binding SightfuncpersonschemesShowCommand}" Visibility="Hidden">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/OrgChartHS.png"  Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem   Header="Основания" Command="{Binding AuthoritiesShowCommand}" Visibility="Hidden">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/x-office-document.png"   Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton Text="Документы" LargeImage="/MContracts;component/Images/New_document.bmp" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem   Header="Документы"  Command="{Binding DocumentsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/New_document.bmp"   Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem   Header="Типы актов приемки-передачи" Command="{Binding TransferacttypesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Types.png"    Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>

                                <telerik:RadMenuItem   Header="Типы актов приемки-передачи для документов" Command="{Binding TransferacttypedocumentsShowCommand}"/>
                        
                                <telerik:RadMenuItem   Header="Типы актов сдачи-приёмки"  Command="{Binding ActtypesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/emblem-documents.png"    Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>

                                <telerik:RadMenuItem   Header="Типы платежных документов" Command="{Binding PrepaymentdocumenttypesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Prepaimentdocuments.png"    Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                    </telerikRibbon:RadRibbonDropDownButton>



                    <telerikRibbon:RadRibbonDropDownButton Text="Проблемы" LargeImage="/MContracts;component/Resources/Trouble.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem Header="Проблемы"   Command="{Binding TroublesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/Trouble.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Header="Перечни проблем" Command="{Binding TroublesregistresShowCommand}" />
                             </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>



                    <telerikRibbon:RadRibbonDropDownButton Text="Промгаз" LargeImage="/MContracts;component/Resources/gaz_sotr.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem Header="Отделы" Command="{Binding DepartmentsShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/gaz_sotr.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Header="Сотрудники" Command="{Binding EmployeesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/gaz_sotr.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem> 
                                
                                <telerik:RadMenuItem Header="Роли" Command="{Binding RolesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/loginmanager.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton  Text="НДС" LargeImage="/MContracts;component/Resources/NDS.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem   Header="НДС"  Command="{Binding NdsesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/NDS.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem   Header="Алгоритмы вычисления НДС"  Command="{Binding NdsalgorithmesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/edu_mathematics.png" Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>
                                </telerik:RadMenuItem>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton  Text="Экономическая эффективность" LargeImage="/MContracts;component/Resources/money_calculator.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem   Header="Типы экономической эффективности" Command="{Binding EconomefficiencytypesShowCommand}">
                                    <telerik:RadMenuItem.Icon>
                                        <Image Source="/MContracts;component/Resources/table-money.png"  Stretch="Uniform" />
                                    </telerik:RadMenuItem.Icon>

                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem   Header="Параметры экономической эффективности" Command="{Binding EconomefficiencyparametersShowCommand}"/>
                               
                                <telerik:RadMenuItem   Header="Параметры типов экономической эффективности" Command="{Binding EfficienceparameterTypesShowCommand}"/>
                               </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton  Text="НТП" LargeImage="/MContracts;component/Resources/agt_update_critical.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                        <telerik:RadMenuItem  Header="Виды НТП" Command="{Binding NtpviewsShowCommand}"/>
                        <telerik:RadMenuItem  Header="Подвиды НТП" Command="{Binding NtpsubviewsShowCommand}"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton  Text="Согласование" LargeImage="/MContracts;component/Resources/agreement_dicts.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                        <telerik:RadMenuItem  Header="Места нахождения" Command="{Binding LocationsShowCommand}"/>
                        <telerik:RadMenuItem  Header="Типы писем" Command="{Binding MissiveTypesShowCommand}"/>
                        <telerik:RadMenuItem  Header="Цели направления на согласование" Command="{Binding ApprovalGoalsShowCommand}"/>
                        <telerik:RadMenuItem  Header="Состояния согласования" Command="{Binding ApprovalStatesShowCommand}"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton  Text="Отчетность" LargeImage="/MContracts;component/Resources/emblem-documents.png" Size="Large">
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem  Header="Цвета для тематического плана на год" Command="{Binding YearreportcolorsShowCommand}"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>

                    </telerikRibbon:RadRibbonDropDownButton>
                    
                    <telerikRibbon:RadRibbonButton   Text="Регионы" LargeImage="/MContracts;component/Resources/keyboard_layout.png" Command="{Binding RegionsShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text="Состояния договоров" LargeImage="/MContracts;component/Resources/States.png" Command="{Binding ContractStatesShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text="Типы договоров" LargeImage="/MContracts;component/Resources/condition_catalog.png" Command="{Binding ContractTypesShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text="Валюты" LargeImage="/MContracts;component/Resources/bmicon.png" Command="{Binding CurrenciesShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text="Единицы измерения" LargeImage="/MContracts;component/Resources/stock_draw-dimension-line.png" Command="{Binding CurrencymeasuresShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text="Виды работ" LargeImage="/MContracts;component/Resources/emblem-work.png"  Command="{Binding WorktypesShowCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                    <telerikRibbon:RadRibbonButton   Text=" "  Command="{Binding SaveLogFileCommand}" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}"/>
                </telerikRibbon:RadRibbonGroup>
            </telerikRibbon:RadRibbonTab>

            <!---Отчетность-->
            <telerikRibbon:RadRibbonTab Header="Отчетность" >
                <telerikRibbon:RadRibbonGroup Header="Отчётность">
                    <telerikRibbon:RadRibbonDropDownButton Text="Текущий тематический план" Size="Large" >
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem  Header="Год" Command="{Binding YearTemplanCommand}"/>
                                <telerik:RadMenuItem  Header="Квартал" Command="{Binding QuarterTemplanCommand}"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton Text="Текущая справка" Size="Large" >
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem  Header="По договорам" Command="{Binding CreateInformationReportCommand}"/>
                                <telerik:RadMenuItem  Header="По договорам на переходный период" Command="{Binding CreateExcelContractsPeriodReportCommand}" />
                                <telerik:RadMenuItem  Header="О сдаче работ НИОКР" Command ="{Binding CreateExcelHandingWorkReportCommand}"/>
                                <telerik:RadMenuItem  Header="По договорам с соисполнителями" Command="{Binding CreateExcelSubContractReportCommand}"/>
                                <telerik:RadMenuItem  Header="О ходе подписания договоров"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                    </telerikRibbon:RadRibbonDropDownButton>

                    <telerikRibbon:RadRibbonDropDownButton Text="Оперативные сведения о выполнении работ" Size="Large" >
                        <telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadContextMenu BorderThickness="0">
                                <telerik:RadMenuItem  Header="Год" Command="{Binding CreateYearExcelEfficientInformationReportCommand}"/>
                                <telerik:RadMenuItem  Header="Месяц" Command="{Binding CreateMonthExcelEfficientInformationReport}"/>
                                <telerik:RadMenuItem  Header="Квартал"/>
                                <telerik:RadMenuItem  Header="Полугодие"/>
                            </telerik:RadContextMenu>
                        </telerikRibbon:RadRibbonDropDownButton.DropDownContent>
                    </telerikRibbon:RadRibbonDropDownButton>

                </telerikRibbon:RadRibbonGroup>
            </telerikRibbon:RadRibbonTab>
            <telerikRibbon:RadRibbonTab Header="Сервис">
                <telerikRibbon:RadRibbonGroup Header="Настройка">
                    <telerikRibbon:RadRibbonButton ToolTip="Настройка" Command="{Binding OpenToolsCommand}" Text="Настройка" Size="Large" Template="{StaticResource RibbonButtonControlTemplate}" /> 
                </telerikRibbon:RadRibbonGroup>
            </telerikRibbon:RadRibbonTab>


                <!--<Fluent:Ribbon.ContextualGroups>
                <Fluent:RibbonContextualTabGroup Header="Договоры" Visibility="Collapsed" x:Name="ContractsGroup" Background="Green" BorderBrush="Green" />
            </Fluent:Ribbon.ContextualGroups>-->




            <!--<Fluent:RibbonTabItem Header=""Visibility="Collapsed" Group="{Binding ElementName=ContractsGroup}">
                
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding NewContractCommand}" Header="Новый договор" LargeIcon="/MContracts;component/Resources/window_new.png" />
                    <Fluent:Button  Header="Новое ДС" LargeIcon="/MContracts;component/Resources/view_right.png" Command="{Binding NewAgreementCommand}"/>
                    <Fluent:Button  Header="Новый СД" LargeIcon="/MContracts;component/Resources/view_bottom.png" Command="{Binding NewSubgeneralCommand}"/>
                    <Fluent:Button Header="Редактор связей" Command="{Binding ShowRelationsEditorCommand}" LargeIcon="/MContracts;component/Resources/Relations.png"/>
                    <Fluent:DropDownButton Header="Экспортировать" LargeIcon="/MContracts;component/Resources/export.png">
                        <Fluent:MenuItem Header="Microsoft Excel 2003" Command="{Binding ExportRegistryToExcel}" Icon="/MContracts;component/Resources/document_microsoft_excel_01.png"></Fluent:MenuItem>        
                    </Fluent:DropDownButton>
                </Fluent:RibbonGroupBox>

                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button  Header="Открыть" LargeIcon="/MContracts;component/Resources/open.png" Command="{Binding OpenContractCommand}"/>
                    <Fluent:Button  Header="{Binding SelectedContract, Converter={StaticResource ContractToButtonTextConverter}}" LargeIcon="{Binding SelectedContract, Converter={StaticResource ContractToButtonImageConverter}}" x:Name="DeleteOrCancelButton" Command="{Binding DeleteOrCancelContractCommand}"/>
                </Fluent:RibbonGroupBox>

                
                <Fluent:RibbonGroupBox Header="Фильтр договоров">
                    <controls:FilterContracts HorizontalAlignment="Stretch"  x:Name="filterContracts1" VerticalAlignment="Top" Height="70"/>                
                </Fluent:RibbonGroupBox>
  
            </Fluent:RibbonTabItem>
-->

            <!--Договор-->
            <!--<Fluent:RibbonTabItem Header="Работа с договором" x:Name="SelectedContractTabItem" Visibility="Collapsed" Group="{Binding ElementName=ContractsGroup}">
                <Fluent:RibbonGroupBox Header="Действия">
                    <Border CornerRadius="2" BorderBrush="{Binding Error, Converter={StaticResource BoolToBrushConverter}}" BorderThickness="2" ToolTip="{Binding Error}">
                        <Fluent:Button ToolTip="Сохранить" LargeIcon="/MContracts;component/Resources/stock_save.png" Command="{Binding SaveActiveWorkspaceCommand}" Header="Сохранить" Margin="1"/>
                    </Border>
                    <Border>
                        <Fluent:Button ToolTip="Открыть редактор календарного плана договора" LargeIcon="/MContracts;component/Images/config_date.png" Command="{Binding OpenContractScheduleCommand}" Header="Календарный план" Margin="1"/>
                    </Border>
                    <Border>
                        <Fluent:Button ToolTip="Открыть реестр актов договора" LargeIcon="/MContracts;component/Images/text_editor.png" Command="{Binding OpenContractActsCommand}" Header="Акты" Margin="1"/>
                    </Border>
                    <Border>
                        <Fluent:DropDownButton Header="Акты приемки-передачи" >
                            <Fluent:MenuItem Header="Приёмки и передачи актов к договорам"  Command="{Binding CreateTransferContractsReport_8_2_Command}"/>
                            <Fluent:MenuItem Header="Приёмки и передачи договоров" Command="{Binding CreateTransferActsContractsReport_8_1_Command}"/>
                        </Fluent:DropDownButton>
                    </Border>
                </Fluent:RibbonGroupBox>
                
            </Fluent:RibbonTabItem>-->

            <!--<Fluent:RibbonTabItem Header="Реестр актов" x:Name="ActTabItem" Visibility="Collapsed">
                <Fluent:RibbonGroupBox Header="Действия">
                    <Fluent:Button Header="Редактировать несколько актов" LargeIcon="/MContracts;component/Resources/MultiEditAct.png" Command="{Binding MultiEditActsCommand}" />
                    <Fluent:Button  Header="{Binding SelectedContract, Converter={StaticResource ContractToButtonTextConverter}}" LargeIcon="{Binding SelectedContract, Converter={StaticResource ContractToButtonImageConverter}}" x:Name="DeleteOrCancelButton2" Command="{Binding DeleteOrCancelContractCommand}"/>
                </Fluent:RibbonGroupBox>
                
                <Fluent:RibbonGroupBox Header="Фильтрация по датам">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        
                        <Label Content="Начало периода" />
                        <DatePicker x:Name="BeginDatePicker" Margin="3" Width="100" Grid.Column="1" SelectedDateChanged="BeginDatePicker_SelectedDateChanged"/>

                        <Label Content="Конец периода" Grid.Row="1"/>
                        <DatePicker x:Name="EndDatePicker" Width="100" Margin="3" Grid.Row="1" Grid.Column="1" SelectedDateChanged="EndDatePicker_SelectedDateChanged"/>
                    </Grid>
                </Fluent:RibbonGroupBox>

                <Fluent:RibbonGroupBox Header="Фильтрация по договорам">
                    <StackPanel Orientation="Horizontal">
                        <ListBox Width="300" Height="60" x:Name="ContractsListBox" Margin="3">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Label Content="{Binding Converter={StaticResource ContractdocConverter}}"/>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>

                        <Fluent:Button ToolTip="Сбросить фильтр" Header="Сбросить фильтр" LargeIcon="/MContracts;component/Images/Trash.png" Margin="3" Click="Button_Click_1"/>

                        <Fluent:Button ToolTip="Фильтровать по договорам" Header="Фильтровать по договорам" LargeIcon="/MContracts;component/Resources/filter.png" Margin="3" Click="Button_Click"/>
                    </StackPanel>
                </Fluent:RibbonGroupBox>
                
            </Fluent:RibbonTabItem>

            <Fluent:RibbonTabItem Header="Документы" x:Name="DocsTabItem">
                <Fluent:RibbonGroupBox Header="Распоряжения и приказ">
                    <Fluent:Button  Header="Распоряжения" Command="{Binding ShowDisposalsRepositoryCommand}" Icon="/MContracts;component/Images/Document_Text.png"/>
                    <Fluent:Button  Header="Приказы" Command="{Binding ShowOrdersRepositoryCommand}" Icon="/MContracts;component/Images/Document_Text.png"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>-->

            <!---Справочники-->
            <!--<Fluent:RibbonTabItem Header="Справочники" x:Name="CatalogTabItem">
                <Fluent:RibbonGroupBox Header="Действия">
                    <Fluent:Button ToolTip="Сохранить изменения" Command="{Binding SaveActiveWorkspaceCommand}" LargeIcon="/MContracts;component/Resources/stock_save.png" Header="Сохранить"/>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="">

                    <Fluent:SplitButton Header="Контрагенты" LargeIcon="/MContracts;component/Resources/stock_people.png">
                        <Fluent:MenuItem  Header="Контрагенты" Icon="/MContracts;component/Resources/bank.png" Command="{Binding ContractorsShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы контрагентов" Command="{Binding ContractortypesShowCommand}"/>
                        <Fluent:MenuItem  Header="Должности" Icon="/MContracts;component/Resources/frontrow.png" Command="{Binding PositionsShowCommand}"/>
                        <Fluent:MenuItem  Header="Должности контрагентов" Icon="/MContracts;component/Resources/frontrow_person.png" Command="{Binding ContractorpositionsShowCommand}"/>
                        <Fluent:MenuItem  Header="Свойства" Icon="/MContracts;component/Resources/Properties.png" Command="{Binding PropertiesShowCommand}"/>
                        <Fluent:MenuItem  Header="Свойства контрагентов" Command="{Binding ContractorpropertiesShowCommand}"/>
                        <Fluent:MenuItem  Header="Персоны" Icon="/MContracts;component/Resources/persons.png" Command="{Binding PersonsShowCommand}"/>
                        <Fluent:MenuItem  Header="Ученые степени" Icon="/MContracts;component/Resources/Degree.png"  Command="{Binding DegreesShowCommand}"/>
                        <Fluent:MenuItem  Header="Функциональные заказчики" Icon="/MContracts;component/Resources/User group.png" Command="{Binding FunctionalcustomersShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы функциональных заказчиков" Icon="/MContracts;component/Resources/Types.png" Command="{Binding FunctionalcustomertypesShowCommand}"/>
                        <Fluent:MenuItem  Header="Представители функциональных заказчиков" Command="{Binding FunccustomerpersonsShowCommand}"/>

                        <Fluent:MenuItem  Header="Схемы визирования функционального заказчика" Icon="/MContracts;component/Resources/OrgChartHS.png" Command="{Binding SightfuncpersonschemesShowCommand}" Visibility="Hidden"/>
                        <Fluent:MenuItem  Header="Основания" Icon="/MContracts;component/Resources/x-office-document.png" Command="{Binding AuthoritiesShowCommand}" Visibility="Hidden"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="Документы" LargeIcon="/MContracts;component/Images/New_document.bmp">
                        <Fluent:MenuItem  Header="Документы" Icon="/MContracts;component/Resources/New_document.bmp" Command="{Binding DocumentsShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы актов приемки-передачи" Icon="/MContracts;component/Resources/Types.png" Command="{Binding TransferacttypesShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы актов приемки-передачи для документов" Command="{Binding TransferacttypedocumentsShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы актов сдачи-приёмки" Icon="/MContracts;component/Resources/emblem-documents.png" Command="{Binding ActtypesShowCommand}"/>
                        <Fluent:MenuItem  Header="Типы платежных документов" Icon="/MContracts;component/Resources/Prepaimentdocuments.png" Command="{Binding PrepaymentdocumenttypesShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="Проблемы" LargeIcon="/MContracts;component/Resources/Trouble.png">
                        <Fluent:MenuItem  Header="Проблемы"  Icon="/MContracts;component/Resources/Trouble.png" Command="{Binding TroublesShowCommand}"/>
                        <Fluent:MenuItem  Header="Перечни проблем" Command="{Binding TroublesregistresShowCommand}"/>
                    </Fluent:SplitButton>

                    
                    <Fluent:SplitButton Header="Промгаз" LargeIcon="/MContracts;component/Resources/gaz_sotr.png">
                        <Fluent:MenuItem  Header="Отделы" Icon="/MContracts;component/Resources/gaz_sotr.png" Command="{Binding DepartmentsShowCommand}"/>
                        <Fluent:MenuItem  Header="Сотрудники" Icon="/MContracts;component/Resources/gaz_sotr.png" Command="{Binding EmployeesShowCommand}"/>
                        <Fluent:MenuItem  Header="Роли" Icon="/MContracts;component/Resources/loginmanager.png" Command="{Binding RolesShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="НДС" LargeIcon="/MContracts;component/Resources/NDS.png">
                        <Fluent:MenuItem  Header="НДС" Icon="/MContracts;component/Resources/NDS.png" Command="{Binding NdsesShowCommand}"/>
                        <Fluent:MenuItem  Header="Алгоритмы вычисления НДС" Icon="/MContracts;component/Resources/edu_mathematics.png" Command="{Binding NdsalgorithmesShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="Экономическая эффективность" LargeIcon="/MContracts;component/Resources/money_calculator.png">
                        <Fluent:MenuItem  Header="Типы экономической эффективности" Icon="/MContracts;component/Resources/table-money.png" Command="{Binding EconomefficiencytypesShowCommand}"/>
                        <Fluent:MenuItem  Header="Параметры экономической эффективности" Command="{Binding EconomefficiencyparametersShowCommand}"/>
                        <Fluent:MenuItem  Header="Параметры типов экономической эффективности" Command="{Binding EfficienceparameterTypesShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="НТП" LargeIcon="/MContracts;component/Resources/agt_update_critical.png">
                        <Fluent:MenuItem Header="Виды НТП" Command="{Binding NtpviewsShowCommand}"/>
                        <Fluent:MenuItem Header="Подвиды НТП" Command="{Binding NtpsubviewsShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:SplitButton Header="Согласование" LargeIcon="/MContracts;component/Resources/agreement_dicts.png">
                        <Fluent:MenuItem Header="Места нахождения" Command="{Binding LocationsShowCommand}"/>
                        <Fluent:MenuItem Header="Типы писем" Command="{Binding MissiveTypesShowCommand}"/>
                        <Fluent:MenuItem Header="Цели направления на согласование" Command="{Binding ApprovalGoalsShowCommand}"/>
                        <Fluent:MenuItem Header="Состояния согласования" Command="{Binding ApprovalStatesShowCommand}"/>
                    </Fluent:SplitButton>

                    <Fluent:Button  Header="Регионы" LargeIcon="/MContracts;component/Resources/keyboard_layout.png" Command="{Binding RegionsShowCommand}"/>
                    <Fluent:Button  Header="Состояния договоров" LargeIcon="/MContracts;component/Resources/States.png" Command="{Binding ContractStatesShowCommand}"/>
                    <Fluent:Button  Header="Типы договоров" LargeIcon="/MContracts;component/Resources/condition_catalog.png" Command="{Binding ContractTypesShowCommand}"/>
                    <Fluent:Button  Header="Валюты" LargeIcon="/MContracts;component/Resources/bmicon.png" Command="{Binding CurrenciesShowCommand}"/>
                    <Fluent:Button  Header="Единицы измерения" LargeIcon="/MContracts;component/Resources/stock_draw-dimension-line.png" Command="{Binding CurrencymeasuresShowCommand}"/>
                    <Fluent:Button  Header="Виды работ" LargeIcon="/MContracts;component/Resources/emblem-work.png"  Command="{Binding WorktypesShowCommand}"/>
                    <Fluent:Button  Header=" "  Command="{Binding SaveLogFileCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>-->

            <!---Отчетность-->
            <!--<Fluent:RibbonTabItem Header="Отчетность">
                <Fluent:RibbonGroupBox Header="Отчётность">
                    <Fluent:DropDownButton Header="Текущий тематический план" >
                        <Fluent:MenuItem Header="Год" Command="{Binding YearTemplanCommand}"/>
                    </Fluent:DropDownButton>
                    <Fluent:DropDownButton Header="Текущая справка" >
                        <Fluent:MenuItem Header="По договорам" Command="{Binding CreateInformationReportCommand}"/>
                        <Fluent:MenuItem Header="По договорам на переходный период" Command="{Binding CreateExcelContractsPeriodReportCommand}" />
                        <Fluent:MenuItem Header="О сдаче работ НИОКР" Command ="{Binding CreateExcelHandingWorkReportCommand}"/>
                        <Fluent:MenuItem Header="По договорам с соисполнителями" Command="{Binding CreateExcelSubContractReportCommand}"/>
                        <Fluent:MenuItem Header="О ходе подписания договоров"/>
                    </Fluent:DropDownButton>
                    <Fluent:DropDownButton Header="Оперативные сведения о выполнении работ" >
                        <Fluent:MenuItem Header="Год" Command="{Binding CreateYearExcelEfficientInformationReportCommand}"/>
                        <Fluent:MenuItem Header="Месяц" Command="{Binding CreateMonthExcelEfficientInformationReport}"/>
                        <Fluent:MenuItem Header="Квартал"/>            
                        <Fluent:MenuItem Header="Полугодие"/>
                    </Fluent:DropDownButton>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Сервис">
                <Fluent:RibbonGroupBox Header="Настройка">
                    <Fluent:Button ToolTip="Настройка" Command="{Binding OpenToolsCommand}" Header="Настройка"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>-->


        </telerikRibbon:RadRibbonView>

        <Border Grid.Row="1">
            <TabControl ItemsSource="{Binding Workspaces}"  x:Name="Workspaces" />
        </Border>

    </Grid>

</Window>
